/**
 * function : turning circle when it is clicked
 */
function turnCirle(object) {
	$(object).animate({
		width : "70%",
		opacity : 0.4,
		fontSize : "3em",
	}, 1500);
}
var p = 0;
function moveit() {
	p += .02;

	var r = 250;
	var xcenter = 520;
	var ycenter = 280;

	var left_Left = Math.floor(xcenter + -(r * Math.cos(p)));
	var left_Top = Math.floor(ycenter + -(r * Math.sin(p)));
	var right_Left = Math.floor(xcenter + (r * Math.cos(p)));
	var right_Top = Math.floor(ycenter + (r * Math.sin(p)));

	var up_Left = Math.floor(xcenter + (r * Math.sin(-p)));
	var up_Top = Math.floor(ycenter + (r * Math.cos(-p)));
	var down_Left = Math.floor(xcenter + -(r * Math.sin(-p)));
	var down_Top = Math.floor(ycenter + -(r * Math.cos(-p)));
	$('#left').animate({
		top : left_Top,
		left : left_Left,
	}, 100, function() {
		moveit()
	});
	$('#right').animate({
		top : right_Top,
		left : right_Left,
	}, 100, function() {
		moveit();
	});
	$('#up').animate({
		top : up_Top,
		left : up_Left,
	}, 100, function() {
		moveit();
	});

	$('#down').animate({
		top : down_Top,
		left : down_Left,
	}, 100, function() {
		moveit();
	});

}
$(document).ready(function() {
	moveit();
});